import { useEffect } from "react"

export default ({ updateCount, count }: any) => {

  useEffect(() => {
    updateCount(2)
  }, [])

  return <button onClick={() => updateCount(count-1)}>count-- {count}</button>
}